<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="UTF-8">
    <title>Etched指令导出 | Iam Music Player中转站</title>
    <style>
        /* 保留原有样式不变 */
        :root {
            --primary-color: #28a745;
            --danger-color: #dc3545;
            --disabled-color: #6c757d;
            --background-color: #f8f9fa;
            --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        }

        body {
            font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
            background-color: var(--background-color);
            margin: 0;
            padding: 20px;
            line-height: 1.6;
        }

        .container {
            max-width: 600px;
            margin: 0 auto;
            padding: 20px;
        }

        h1 {
            color: #2c3e50;
            text-align: center;
            margin: 2rem 0 1.5rem;
            font-size: 2.2em;
            text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
        }

        .card {
            background: white;
            border-radius: 12px;
            padding: 2rem;
            box-shadow: var(--card-shadow);
            margin: 2rem auto;
        }

        .form-group {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 1.5rem;
        }

        .status-text {
            text-align: center;
            font-weight: 500;
            margin: 1rem 0;
        }

        .alert {
            padding: 12px;
            border-radius: 8px;
            text-align: center;
            margin: 1rem 0;
        }

        .alert-danger {
            background-color: #f8d7da;
            border: 1px solid #f5c6cb;
            color: var(--danger-color);
        }

        .alert-success {
            background-color: #d4edda;
            border: 1px solid #c3e6cb;
            color: #155724;
        }

        .button {
            padding: 12px 32px;
            border-radius: 6px;
            font-weight: 600;
            transition: all 0.2s ease;
            cursor: pointer;
            border: none;
            font-size: 1.1em;
        }

        .button-primary {
            background-color: var(--primary-color);
            color: white;
        }

        .button-primary:hover:not(:disabled) {
            background-color: #218838;
            transform: translateY(-1px);
        }

        .button-primary:disabled {
            background-color: var(--disabled-color);
            cursor: not-allowed;
        }

        .download-section {
            text-align: center;
            margin-top: 2rem;
        }
    </style>
</head>
<body>
    <div class="container">
        <h1>Etched指令一键导出</h1>
        <p class="status-text">生成的指令文件将自动保存到预设目录</p>

        <div class="card">
            <p class="alert alert-danger">注意：导出的时候手慢点！</p>
            <p class="alert alert-success">生成状态：{{ export_status }}</p>

            <form action="_etched_command_output" method="get">
                <div class="form-group">
                    <input
                        type="submit"
                        value="立即生成指令"
                        {{ generate_disabled }}
                        class="button button-primary"
                    >
                </div>
            </form>

            <div class="download-section">
                <a href="download_file?path=../bin/command.mcfunction" {{ download_disabled }}>
                    <button class="button button-primary">下载指令包</button>
                </a>
            </div>
        </div>
    </div>
</body>
</html>